class Storage {

  static put(k, v) {
    wx.setStorageSync(k, v)
  }

  static get(k, def) {
    var res = wx.getStorageSync(k);
    if (res) {
      return res;
    } else {
      return def;
    }
  }

  static remove(k) {
    wx.removeStorageSync(k);
  }

  static clear() {
    wx.clearStorageSync();
  }

}

export {Storage}